import pandas as pd
import numpy as np

def calculate_ema(data,window):
    # 计算指数移动平均
    data[''].ewm
    ema = data['Close'].ewm(span=window, adjust=False).mean()
    return ema

# 假设有一个包含收盘价的DataFrame
data = {'Close': [10, 12, 15, 14, 16, 18, 20]}
df = pd.DataFrame(data)

# 指定短期窗口大小（通常是12天）
short_term_window = 10

# 计算短期指数移动平均
short_term_ema = calculate_ema(df, short_term_window)

# 输出结果
print(short_term_ema)